package com.example.exception;

/**
 * Copyright: Copyright (c) 2022
 *
 * <p>
 * Description: opc自定义异常处理类
 *
 * @author LiuFeng
 * @version 2022/11/17 17:11
 * @since
 */
public class OpcException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private String code;
    private String errorMessage;

    public OpcException() {

    }

    public OpcException(Throwable throwable){
        super(throwable);
    }

    public OpcException(String code, String errorMessage) {
        super(errorMessage);
        this.code = code;
        this.errorMessage = errorMessage;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
}
